cmake_minimum_required(VERSION 3.10)
project(SenLogBenchmark)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 找到 pthread 库，因为日志器用到了 std::thread
find_package(Threads REQUIRED)

# 添加头文件目录
include_directories(include)
include_directories(third_party) 

# 添加性能测试的可执行文件
add_executable(benchmark tests/benchmark.cpp)
add_executable(latency_benchmark tests/latency_benchmark.cpp)

# 链接必要的库
target_link_libraries(benchmark PRIVATE Threads::Threads)
target_link_libraries(latency_benchmark PRIVATE Threads::Threads)